home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Developer Essentials / MPW Interfaces & Libraries / PInterfaces / ToolUtils.p < prev    next >
Encoding:
Text File  |  1992-01-29  |  3.0 KB  |  117 lines  |  [TEXT/MPS ]

  1.  
  2. {
  3. Created: Monday, September 16, 1991 at 1:28 AM
  4.  ToolUtils.p
  5.  Pascal Interface to the Macintosh Libraries
  6.  
  7.   Copyright Apple Computer, Inc. 1985-1991
  8.   All rights reserved
  9. }
  10.  
  11.  
  12. {$IFC UNDEFINED UsingIncludes}
  13. {$SETC UsingIncludes := 0}
  14. {$ENDC}
  15.  
  16. {$IFC NOT UsingIncludes}
  17.  UNIT ToolUtils;
  18.  INTERFACE
  19. {$ENDC}
  20.  
  21. {$IFC UNDEFINED UsingToolUtils}
  22. {$SETC UsingToolUtils := 1}
  23.  
  24. {$I+}
  25. {$SETC ToolUtilsIncludes := UsingIncludes}
  26. {$SETC UsingIncludes := 1}
  27. {$IFC UNDEFINED UsingQuickdraw}
  28. {$I $$Shell(PInterfaces)Quickdraw.p}
  29. {$ENDC}
  30. {$SETC UsingIncludes := ToolUtilsIncludes}
  31.  
  32. CONST
  33. sysPatListID = 0;
  34. iBeamCursor = 1;
  35. crossCursor = 2;
  36. plusCursor = 3;
  37. watchCursor = 4;
  38.  
  39. TYPE
  40. Int64Bit = RECORD
  41.  hiLong: LONGINT;
  42.  loLong: LONGINT;
  43.  END;
  44.  
  45.  
  46. FUNCTION FixRatio(numer: INTEGER;denom: INTEGER): Fixed;
  47.  INLINE $A869;
  48. FUNCTION FixMul(a: Fixed;b: Fixed): Fixed;
  49.  INLINE $A868;
  50. FUNCTION FixRound(x: Fixed): INTEGER;
  51.  INLINE $A86C;
  52. FUNCTION GetString(stringID: INTEGER): StringHandle;
  53.  INLINE $A9BA;
  54. FUNCTION Munger(h: Handle;offset: LONGINT;ptr1: Ptr;len1: LONGINT;ptr2: Ptr;
  55.  len2: LONGINT): LONGINT;
  56.  INLINE $A9E0;
  57. PROCEDURE PackBits(VAR srcPtr: Ptr;VAR dstPtr: Ptr;srcBytes: INTEGER);
  58.  INLINE $A8CF;
  59. PROCEDURE UnpackBits(VAR srcPtr: Ptr;VAR dstPtr: Ptr;dstBytes: INTEGER);
  60.  INLINE $A8D0;
  61. FUNCTION BitTst(bytePtr: Ptr;bitNum: LONGINT): BOOLEAN;
  62.  INLINE $A85D;
  63. PROCEDURE BitSet(bytePtr: Ptr;bitNum: LONGINT);
  64.  INLINE $A85E;
  65. PROCEDURE BitClr(bytePtr: Ptr;bitNum: LONGINT);
  66.  INLINE $A85F;
  67. FUNCTION BitAnd(value1: LONGINT;value2: LONGINT): LONGINT;
  68.  INLINE $A858;
  69. FUNCTION BitOr(value1: LONGINT;value2: LONGINT): LONGINT;
  70.  INLINE $A85B;
  71. FUNCTION BitXor(value1: LONGINT;value2: LONGINT): LONGINT;
  72.  INLINE $A859;
  73. FUNCTION BitNot(value: LONGINT): LONGINT;
  74.  INLINE $A85A;
  75. FUNCTION BitShift(value: LONGINT;count: INTEGER): LONGINT;
  76.  INLINE $A85C;
  77. FUNCTION HiWord(x: LONGINT): INTEGER;
  78.  INLINE $A86A;
  79. FUNCTION LoWord(x: LONGINT): INTEGER;
  80.  INLINE $A86B;
  81. PROCEDURE LongMul(a: LONGINT;b: LONGINT;VAR result: Int64Bit);
  82.  INLINE $A867;
  83. FUNCTION GetIcon(iconID: INTEGER): Handle;
  84.  INLINE $A9BB;
  85. PROCEDURE PlotIcon(theRect: Rect;theIcon: Handle);
  86.  INLINE $A94B;
  87. FUNCTION GetPattern(patternID: INTEGER): PatHandle;
  88.  INLINE $A9B8;
  89. FUNCTION GetCursor(cursorID: INTEGER): CursHandle;
  90.  INLINE $A9B9;
  91. FUNCTION GetPicture(pictureID: INTEGER): PicHandle;
  92.  INLINE $A9BC;
  93. FUNCTION SlopeFromAngle(angle: INTEGER): Fixed;
  94.  INLINE $A8BC;
  95. FUNCTION AngleFromSlope(slope: Fixed): INTEGER;
  96.  INLINE $A8C4;
  97. PROCEDURE SetString(theString: StringHandle;strNew: Str255);
  98.  INLINE $A907;
  99. FUNCTION DeltaPoint(ptA: Point;ptB: Point): LONGINT;
  100.  INLINE $A94F;
  101. FUNCTION NewString(theString: Str255): StringHandle;
  102.  INLINE $A906;
  103. PROCEDURE ShieldCursor(shieldRect: Rect;offsetPt: Point);
  104.  INLINE $A855;
  105. PROCEDURE GetIndString(VAR theString: Str255;strListID: INTEGER;index: INTEGER);
  106. PROCEDURE ScreenRes(VAR scrnHRes: INTEGER;VAR scrnVRes: INTEGER);
  107.  INLINE $225F,$32B8,$0102,$225F,$32B8,$0104;
  108. PROCEDURE GetIndPattern(VAR thePat: Pattern;patternListID: INTEGER;index: INTEGER);
  109.  
  110.  
  111. {$ENDC} { UsingToolUtils }
  112.  
  113. {$IFC NOT UsingIncludes}
  114.  END.
  115. {$ENDC}
  116.  
  117.